1. Field
Apparatuses and methods consistent with the exemplary embodiments relate to an image processing apparatus and an image processing method thereof, and more particularly, to an image processing apparatus capable of rendering an image ray tracing method.
2. Description of the Related Art
In a related art, graphic rendering is processed by a graphics processing unit (GPU), but realistic and 3-dimensional rendering is not possible. Recently, realistic rendering methods such as ray casting, ray tracing, and global illumination have been developed as more realistic and 3-dimensional rendering algorithms.
An image processing apparatus 100 in the related art includes a ray generator 110, a tree searcher 120, an intersection tester 130, and a shader 140 as shown in FIG. 1. An operating load of the tree searcher 120 is the largest operating load on the image processing apparatus 100, and the performance of the tree searcher 120 has the greatest effect on the entire performance of the image processing apparatus 100. Accordingly, in order to enhance the performance, the image processing apparatus 100 includes a plurality of tree searchers 120-1, 120-2, 120-3 . . . as shown in FIG. 1.
Each ray generated by the ray generator 110 is allocated to one of the plurality of tree searchers 120-1, 120-2, 120-3 . . . . The tree searcher to which a ray is allocated affects a cache memory hit ratio of the tree searcher 120. Since the cache memory hit ratio greatly affects the performance of the tree searcher 120, a method for efficiently allocating the ray to the tree searcher 120 is critical.
Related-art methods for allocating rays to the plurality of tree searchers 120-1, 120-2, 120-3 . . . are shown in FIGS. 2A and 2B. More specifically, a plurality of rays generated by the ray generator 110 are allocated to the plurality of tree searchers 120-1, 120-2, 120-3 . . . in the first-in first-out (FIFO) method as shown in FIG. 2A. That is, an empty tree searcher is searched by identifying an input FIFO state of the plurality of tree searchers 120-1, 120-2, 120-3 . . . so that the rays are sequentially allocated to empty tree searchers.
Alternatively, a plurality of rays generated by the ray generator 110 are divided into groups corresponding to the number of the plurality of tree searchers 120-1, 120-2, 120-3 . . . , and each group of rays are allocated to a corresponding tree searcher as shown in FIG. 2B.
However, these methods have the following problems. For example, in the method for allocating the rays in the FIFO method as shown in FIG. 2A, the correlation between rays processed by the tree searcher is low. Accordingly, a cache memory does not have a temporal locality effect, and thus a cache memory hit ratio becomes low. Therefore, the performance of the image processing apparatus may deteriorate.
In addition, the method for allocating rays into groups, as shown in FIG. 2B, yields a higher cache memory hit ratio by temporal locality effect. However, when rays requiring a large amount of tree searches are allocated to a certain group, a load balancing problem may occur. Thus, the tree searcher 120 may not operate efficiently.